package com.xenstra.rhodiumone.service;

import java.util.Date;
import java.util.List;

import com.xenstra.rhodiumone.dao.ConnectionUtil;
import com.xenstra.rhodiumone.dao.RhodiumOneDAO;
import com.xenstra.rhodiumone.vo.EquityVO;
import com.xenstra.rhodiumone.vo.FutureVO;
import com.xenstra.rhodiumone.vo.OptionVO;

public class RhodiumOneManager {

	RhodiumOneDAO dao = new RhodiumOneDAO(ConnectionUtil.getInstance().getConnection());
	
	public List<EquityVO> getAllEquities(){
		return dao.getAllEquities();
	}
	
	public List<Date> getAllExpiryDates(){
		return dao.getAllExpiryDates();
	}
	
	public List<Double> getOptionsStrikePrices(String symbol, String optionType, Date expiryDate){
		return dao.getOptionsStrikePrices(symbol, optionType, expiryDate);
	}
	
	public List<OptionVO> getOptionsData(String symbol, String optionType, Date expiryDate, double strikePrice){
		return dao.getOptionsData(symbol, optionType, expiryDate, strikePrice);
	}
	
	public List<FutureVO> getFuturesData(String symbol,Date expiryDate){
		return dao.getFuturesData(symbol, expiryDate);
	}
	
	public List<EquityVO> executeAdHocEquityQuery(String sql){
		return dao.executeAdHocEquityQuery(sql);
	}
	
	public List<OptionVO> executeAdHocOptionsQuery(String sql){
		return dao.executeAdHocOptionsQuery(sql);
	}
	
	public List<FutureVO> executeAdHocFuturesQuery(String sql){
		return dao.executeAdHocFuturesQuery(sql);
	}
}
